<?
if (!defined('SMF'))
	die('Hacking attempt...');

global $max_turns;

$message .= 'Adding turns...';

$update = $smcFunc['db_query']('', '
	UPDATE {raw:db_ships}
	SET turns = turns + (1 * {int:multiplier})
	WHERE turns < {int:max_turns}',
	array(
		'db_ships' => $dbtables['ships'],
		'multiplier' => $multiplier,
		'max_turns' => $max_turns
		
	)
);

$message .= 'Ensuring maximum turns are ' . $max_turns . '...';

$update = $smcFunc['db_query']('', '
	UPDATE {raw:db_ships}
	SET turns = {int:max_turns}
	WHERE turns > {int:max_turns}',
	array(
		'db_ships' => $dbtables['ships'],
		'multiplier' => $multiplier,
		'max_turns' => $max_turns
		
	)
);

$message .= '<br>';
?>
